package cn.fay.chapter08;

public class StringSwap {
	static String s="abcdefghijklmn";
	public String process(String input){
		char[] cs = input.toCharArray();
		for(int j=0,i=1;i<cs.length;i+=2,j+=2){
			char temp=cs[j];
			cs[j]=cs[i];
			cs[i]=temp;
		}
		return new String(cs);
	}
	public static void main(String[] args) {
		Apply.process(new StringAdapter(new StringSwap()), s);
	}
}
